package com.vanysoft.business.data.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 工厂人员信息管理
 * </p>
 *
 * @author YangLei
 * @since 2018-07-06
 */
@TableName("BASE_PLANT_USER")
public class PlantUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 工厂编号
     */
    @NotBlank(message = "{plant.assignment.hint.notnull}")
    private String plantCode;
    /**
     * 采购经理
     */
    @NotBlank(message = "{plant.assignment.hint.notnull}")
    private String procurementManager;
    /**
     * 采购人员
     */
    @NotBlank(message = "{plant.assignment.hint.notnull}")
    private String procurementUser;
    /**
     * 是否启用（1启用 0不启用）
     */
    private String isEnable;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy/MM/dd")
    private Date modifyTime;
    /**
     * 创建人
     */
    private String createUser;
    /**
     * 修改人
     */
    private String modifyUser;

    @TableField(exist = false)
    private String plantName;
    @TableField(exist = false)
    private String procurementManagerName;
    @TableField(exist = false)
    private String procurementUserName;
    @TableField(exist = false)
    private String modifyUserName;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPlantCode() {
        return plantCode;
    }

    public void setPlantCode(String plantCode) {
        this.plantCode = plantCode;
    }

    public String getProcurementManager() {
        return procurementManager;
    }

    public void setProcurementManager(String procurementManager) {
        this.procurementManager = procurementManager;
    }

    public String getProcurementUser() {
        return procurementUser;
    }

    public void setProcurementUser(String procurementUser) {
        this.procurementUser = procurementUser;
    }

    public String getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(String isEnable) {
        this.isEnable = isEnable;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public String getPlantName() {
        return plantName;
    }

    public void setPlantName(String plantName) {
        this.plantName = plantName;
    }

    public String getProcurementManagerName() {
        return procurementManagerName;
    }

    public void setProcurementManagerName(String procurementManagerName) {
        this.procurementManagerName = procurementManagerName;
    }

    public String getProcurementUserName() {
        return procurementUserName;
    }

    public void setProcurementUserName(String procurementUserName) {
        this.procurementUserName = procurementUserName;
    }

    public String getModifyUserName() {
        return modifyUserName;
    }

    public void setModifyUserName(String modifyUserName) {
        this.modifyUserName = modifyUserName;
    }

    @Override
    public String toString() {
        return "PlantUser{" +
                "id=" + id +
                ", plantCode=" + plantCode +
                ", procurementManager=" + procurementManager +
                ", procurementUser=" + procurementUser +
                ", isEnable=" + isEnable +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", createUser=" + createUser +
                ", modifyUser=" + modifyUser +
                "}";
    }
}
